<template>
  <div>
    <ul>
      <li
        v-for="(item,index) in arr"
        :key="index"
        :class="{red:true,size:true}"
      >{{ index }} --- {{ item }}</li>
    </ul>
    <ul>
      <li
        v-for="(value,key) in obj"
        :key="key"
        :class="{red:true,size:true}"
      >{{key}} --- {{ value }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ["洗脚", "SPA", "按摩"],
      obj: {
        name: "夏萎",
        age: 18
      }
    };
  },

  methods: {}
};
</script>

<style>
.red {
  color: red;
}
.size {
  font-size: 40px;
}
</style>